// pages/me/alter-employee/alter-employee.js
/*var pageObj={
  data:{
    powerChecked1: true,
    powerChecked2: false,
    powerChecked3: true,
    powerChecked4: false,
    powerChecked5: true,
  }
}
for (var i = 1; i < 6; ++i) {
  (function (i) {
    pageObj['powerChange' + i] = function (e) {
      var changedData = {};
      changedData['powerChecked' + i] = !this.data['powerChecked' + i];
      this.setData(changedData);
    }
  })(i)
}
Page(pageObj);*/
Page({

  /**
   * 页面的初始数据
   */
  data: {
    employeeName: '白展堂',
    employeePhone: '1285098746',
    powerChecked1: true,
    powerChecked2: false,
    powerChecked3: true,
    powerChecked4: false,
    powerChecked5: true,
  },

  powerChange1(e) {
    console.log('switch1 发生 change 事件，携带值为', e.detail.value)
    this.setData({
      powerChecked1: e.detail.value
    })
  },
  powerChange2(e) {
    console.log('switch1 发生 change 事件，携带值为', e.detail.value)
    this.setData({
      powerChecked2: e.detail.value
    })
  },
  powerChange3(e) {
    console.log('switch1 发生 change 事件，携带值为', e.detail.value)
    this.setData({
      powerChecked3: e.detail.value
    })
  },
  powerChange4(e) {
    console.log('switch1 发生 change 事件，携带值为', e.detail.value)
    this.setData({
      powerChecked4: e.detail.value
    })
  },
  powerChange5(e) {
    console.log('switch1 发生 change 事件，携带值为', e.detail.value)
    this.setData({
      powerChecked5: e.detail.value
    })
  },
  formSubmit: function (e) {},
 
})